//
//  Common.h
//  BESTKEEP-OC
//
//  Created by 武探 on 2016/10/26.
//  Copyright © 2016年 utouu. All rights reserved.
//

#import <UIKit/UIKit.h>

#define ApplicationEnvironmentProduction 1 //0表示测试环境 1表示线上环境

#define ApplicationBackGauge 12  //到手机屏幕边缘的间距
#define ApplicationNavigationBarBackGauge 7 //导航栏图片距屏幕边缘间距

#define LoadMoreDataTitleColor [UIColor lightGrayColor] //上拉加载更多字体颜色
#define IndictorViewColor HexColor(0x2AB29B) //上拉加载菊花颜色

#define HexColor(hexValue) [Common hexColor:hexValue]
#define ThemeColor HexColor(0x03bfa0)
#define ThemeBackgroundColor HexColor(0xeeeeee) //HexColor(0xefeff4)
#define ScreenBounds [Common screenBounds]
#define ScreenWidth ScreenBounds.size.width
#define ScreenHeight ScreenBounds.size.height
#define NavigationBarMaxY 64.0f
#define UIBarButtonItemFont [UIFont systemFontOfSize:16]
#define SystemVersion [[[UIDevice currentDevice] systemVersion] floatValue]

#define UIFontBoldCustom(size) [Common boldSystemFontOfSize:size]
#define UIFontCustom(size) [Common systemFontOfSize:size]

#define UIFontLargest [Common systemFontOfSize:18]
#define UIFontLarge [Common systemFontOfSize:16]
#define UIFontNormal [Common systemFontOfSize:14]
#define UIFontSmall [Common systemFontOfSize:12]
#define UIFontSmallest [Common systemFontOfSize:10]

//用户登录通知，应由用户模块使用此名称完成通知Post
#define UserDidLoginNotification @"UserDidLoginNotification"
//用户注销
#define UserDidLogoutNotification @"UserDidLogoutNotification"

@interface Common : NSObject

/**
 *  16进制RGB色
 *
 *  @param hexValue RGB值 16进制
 */
+ (UIColor*) hexColor:(NSInteger)hexValue;

/**
 *  屏幕尺寸
 */
+ (CGRect) screenBounds;

/**
 * 根据颜色生成图片
 */
+(UIImage*) imageWithFrame:(CGRect)frame color:(UIColor*)color;

+(UIFont*)systemFontOfSize:(CGFloat)size;

+(UIFont*)boldSystemFontOfSize:(CGFloat)size;

+(BOOL)isVariableWithClass:(Class)cls varName:(NSString *)name;

@end
